package com.example.mapper;

import com.example.entity.Customer;
import com.example.entity.MenuOrder;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MenuOrderMapper {
    void updata(MenuOrder menuOrder);
    @Insert("insert into menu_order(order_id, menu_id, menu_number,menuorder_timestart) value(#{orderId},#{menuId},#{menuNumber},#{menuorderTimestart})")
    void insert(MenuOrder menuOrder);
    @Delete("DELETE FROM menu_order WHERE order_id = #{order_id} and menu_id = #{menu_id}")
    void delete(String order_id,String menu_id);

    List<MenuOrder> selectByorderid(Integer orderid);
    @Select("SELECT * FROM menu_order WHERE order_id = #{orderid} AND menu_id = #{menuid}")
    MenuOrder selectByorderidandmenuid(Integer menuid,Integer orderid);

//    List<Menu> selectByPage(String menuname);
}
